package com.test.ad.demo.bean;

// 广告类型枚举
public enum AdType {
    BANNER("A"),
    NATIVE("B"),
    INTERSTITIAL("C");

    private final String displayName;

    AdType(String displayName) {
        this.displayName = displayName;
    }

    public String getDisplayName() {
        return displayName;
    }

    // 根据显示名称获取枚举值
    public static AdType fromDisplayName(String displayName) {
        for (AdType type : values()) {
            if (type.displayName.equals(displayName)) {
                return type;
            }
        }
        return BANNER; // 默认返回视频广告
    }
}